<template>
	<view class="content">
		<!-- <view class="head" :style="{ paddingTop: navBarHeight }">
			<view class="head-np">
				<image @click="back()" class="back" src="@/static/img/chat-09.png" mode="widthFix"></image>
				<view class="https://www.baidu.com">搜索</view>
			</view>
		</view> -->
		<web-view :style="{ marginTop: navBarHeight }" :src="src" @error="errorInfo"></web-view>
		<!-- <web-view src="https://www.baidu.com" @error="errorInfo"></web-view> -->
		<!-- <view class="btn" @click="back()">返回</view> -->
	</view>
</template>

<script>
	import navBarMixin from '@/mixin/navBarMixin.js'
	export default {
		mixins: [navBarMixin],
		data() {
			return {
				src: ''
			}
		},
		onLoad(e) {
			console.log(e);
			console.log(uni.getStorageSync('searchUrl'));
			this.src = uni.getStorageSync('searchUrl')
			// this.src = e.url
		},
		methods: {
			back() {
				uni.navigateBack()
			},
			errorInfo(e) {
				console.log(e);
			}
		}
	}
</script>

<style scoped lang="less">
	.content {
		overflow: hidden;
	}

	.head {
		position: fixed;
		top: 0;
		z-index: 9999;
		width: 100%;
		background: #fff;

		.head-np {
			display: flex;
			justify-content: center;
			align-items: center;
			width: 100%;
			height: 96rpx;
			padding: 0 30rpx;
			box-shadow: 0rpx 10rpx 10rpx 0rpx rgba(50, 50, 50, 0.1);
			box-sizing: border-box;
			position: relative;

			.title {
				font-size: 36rpx;
				font-weight: bold;
			}

			.back {
				width: 20rpx;
				position: absolute;
				left: 30rpx;
			}

		}
	}
</style>